Generalized BIST for multiport memories

ABSTRACT

A generalized hardware architecture that supports built-in self testing (BIST) for a range of different computer memory configurations and a generalized BIST algorithm can be compiled, based on specified configuration characteristics (e.g., the number of write ports, the number of read ports, the number of entries, and the number of bits per entry in the computer memory), to generate the hardware design for a particular computer memory system. In one embodiment, the generalized hardware architecture includes a multiplexer block that enables a single BIST comparator to be multiplexed for use in performing BIST testing via different read ports of the computer memory.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to built-in self-testing (BIST) forcomputer memories, and, in particular, to BIST testing for multiportmemories.

2. Description of the Related Art

BIST testing refers to testing implemented by on-chip circuitry toverify the proper operation of a computer memory. BIST testing typicallyinvolves (1) writing known data into specific locations within acomputer memory, (2) reading that data from those memory locations, and(3) comparing the read data with the expected (known) data to determinewhether they are identical. If the read data does not match the expecteddata, then something in the computer memory architecture is not workingproperly. BIST testing can be designed to verify the proper operation ofeach memory cell in the computer memory, each write-address decoder usedto write data into the computer memory, and each read-address decoderused to read data from the computer memory.

A wide variety of different types of computer memories are possible. Inparticular, different computer memories may have different numbers ofbits per entry (i.e., bits per word or row), different numbers ofentries, different numbers of write ports through which data can bewritten into the memories, and/or different numbers of read portsthrough which data can be read from the memories. In the past, BISThardware and a corresponding BIST algorithm would be manually designedon a case-by-case basis for each different type of computer memoryhaving a specific set of configuration characteristics (e.g., bits perentry, number of entries, number of write ports, and number of readports).

A typical BIST hardware design relies on a different comparator for eachdifferent read port. That is, data read from the computer memory via aparticular read port is forwarded to a corresponding comparator thatprocesses data read from the memory via only that read port.

SUMMARY OF THE INVENTION

In one embodiment, the present invention is BIST circuitry for testing amemory having multiple read ports. The BIST circuitry comprises amultiplexer block and a comparator. The multiplexer block receives datafrom each of the multiple read ports and outputs selected data from oneof the multiple read ports. The comparator compares the selected datafrom the multiplexer block with expected data to determine whether theselected data matches the expected data.

In another embodiment, the present invention is a method for designingBIST circuitry for testing a memory having one or more write ports andone or more read ports. According to the method, one or more values areassigned for one or more memory configuration parameters for the memory,and a generic BIST algorithm is compiled based on the one or more memoryconfiguration parameters to generate a design for the BIST circuitry.

BRIEF DESCRIPTION OF THE DRAWINGS

Other aspects, features, and advantages of the present invention willbecome more fully apparent from the following detailed description, theappended claims, and the accompanying drawings in which like referencenumerals identify similar or identical elements.

FIG. 1 shows a block diagram of a generalized architecture for computermemories that support BIST testing;

FIG. 2 shows Table I, which presents the relationships between variousmemory configuration characteristics, according to one possible schemefor implementing the computer memory of FIG. 1;

FIG. 3 shows a flow diagram of an exemplary BIST algorithm for thememory architecture of FIG. 1;

FIG. 4 shows Tables II, III, and IV, which present code for one possibleimplementation of BIST testing for the three phases of FIG. 3; and

FIG. 5 shows a flow diagram of a design tool that can be used togenerate specific hardware designs based on the generalized architectureof FIG. 1 and the BIST algorithm of FIGS. 3 and 4.

DETAILED DESCRIPTION

Reference herein to “one embodiment” or “an embodiment” means that aparticular feature, structure, or characteristic described in connectionwith the embodiment can be included in at least one embodiment of theinvention. The appearances of the phrase “in one embodiment” in variousplaces in the specification are not necessarily all referring to thesame embodiment, nor are separate or alternative embodiments necessarilymutually exclusive of other embodiments.

Generalized BIST Architecture

FIG. 1 shows a block diagram of a generalized architecture 100 forcomputer memories that support BIST testing. Architecture 100 enablesBIST testing of multiport memories having any number of write ports(i.e., ports via which data can be written to memory block 102) and upto four read ports (i.e., ports via which data can be read from memoryblock 102). Note that any given port may be either a write-only port, aread-only port, or a read/write port capable of supporting both writeand read operations. As explained later, in theory, architecture 100 canbe extended to support any number of read ports.

Referring to FIG. 1A, memory block 102 is a two-dimensional (2D)computer memory having up to W rows of data (i.e., words or entries),each row of data (i.e., word or entry) having N bits, where PW is thenumber of write ports in memory block 102 (numbered write port 0 throughwrite port PW-1), and PR is the number of read ports (numbered read port0 through read port PR-1). Memory block 102 may be implemented as atwo-dimensional array of memory cells having W rows and N columns, inwhich cells are accessed (i.e., written to or read from) usingcorresponding word (i.e., row) lines and bit (i.e., column) lines. Eachdifferent row of memory block 102 can be represented by a unique M-bitaddress.

Table I in FIG. 2 shows the relationship between the number of rows ofdata (W), the number of bits per row (N), and the number of address bits(M) for memory block 102, according to one possible scheme forimplementing memory block 102. According to Table I, depending on theparticular implementation, memory block 102 can have anywhere from 2 to72 bits per entry (N). When memory block 102 has 2 to 18 bits/entry, thenumber of entries (W) in memory block 102 can be anywhere from 16 to4096 in 16-entry increments (i.e., memory block 102 can be implementedwith either 16, 32, 48, . . . , or 4096 entries). Similarly, when memoryblock 102 has 19 to 36 bits/entry, the number of entries can be anywherefrom 8 to 2048 in 8-entry increments, and, lastly, when memory block 102has 37 to 72 bits/entry, the number of entries can be anywhere from 4 to1024 in 4-entry increments.

In addition, when memory block 102 has 2 to 18 bits/entry, the number ofbits per row address (M) ranges from 4 to 12. Similarly, when memoryblock 102 has 19 to 36 bits/entry, the number of bits per row addressranges from 3 to 11, and, lastly, when memory block 102 has 37 to 72bits/entry, the number of bits per row address ranges from 2 to 10.

Referring again to FIG. 1A, write address buffers 104 receive writeaddress data AWR(PW-1:0)[M-1:0], where (PW-1:0) indicates PW differentwrite addresses, one each for write port 0 through write port PW-1, and[M-1:0) indicates that each write address is an M-bit value. Writeaddress decoder block 106 decodes each M-bit write address value into asignal that energizes a particular word line in memory block 102 toenable data to be written to the cells of that particular row of memoryblock 102.

Input data buffers 108 receive input data DR(PW-1)[N-1:0] to be writteninto memory block 102. Write buffers 110 receive write port clocksignals CKWR[PW-1:0], write chip select signals CSWR[PW-1:0], andbit-write enable signals BWR(PW-1:0)[N-1:0]. Each write port clocksignal CKWR controls the timing of the writing of data into memory block102 through the corresponding write port. Each chip select signal CSWRindicates whether or not the corresponding write port is enabled (i.e.,turned on) and therefore able to receive input data. Each N-bitbit-write enable signal BWR indicates the bits of the correspondingentry that are enabled to be overwritten through the corresponding writeport. The write port clock signals CKWR and write chip select signalsCSWR are also applied and used to control write address buffers 104 andinput data buffers 108.

Read address buffers 112 receive read address data ARR(PR-1:0)[M-1:0](i.e., a different M-bit read address ARR for each of the PR differentread ports). Read port clock signals CKRR[PR-1:0] control the timing ofthe reading of data from memory block 102 for the PR different readports. Read address decoder block 114 decodes each M-bit read addressvalue into a signal that energies a particular word line in memory block102 to enable data to be read from the cells of that particular row ofmemory block 102. Output buffers 115 receive output data read frommemory block 102 and present two copies of that output data:Q(PR-1:0)[N-1:0] and QR(PR-1:0)[N-1:0], where Q is a copy of the outputdata that is made available to circuitry external to memory architecture100, and QR is an identical copy of that output data, which is usedinternally in memory architecture 100, as described below with referenceto FIG. 1C.

FIG. 1B shows a set of seven multiplexer (mux) blocks that are used toprovide the above-described data and signals to the different elementsshown in FIG. 1A. In general, each mux block receives two different setsof inputs: one set associated with “user” data activities of writingand/or reading application data to and from memory block 102 and theother set associated with BIST testing. Each mux also receives a one-bitBIST interface enable signal (BIST) from BIST controller 144 of FIG. 1D(e.g., implemented as a finite state machine (FSM)). When BIST=0, eachmux block selects and presents its “user” input(s) at its output(s).When BIST=1, each mux block selects and presents its “BIST” input(s) atits output(s). In general, user data and signals are received by memoryarchitecture 100 from circuitry external to memory architecture 100,while BIST data and signals are generated internally by BIST controller144.

In particular, input data mux block 116 receives (i) user dataD(PW-1:)[N-1:0] and (ii) BIST data DM(PW-1:0)[1:0] and selects andpresents one of those sets of data (depending on the value of BIST) asinput data DR to input data buffers 108 of FIG. 1A. Note that BIST dataDM has only two bits of data for each write port. In this particularimplementation of BIST testing, the first bit (i.e., bit 0) of BIST dataDM identifies the value for all even bits of an N-bit input data word,while the second bit (i.e., bit 1) of BIST data DM identifies the valuefor all odd bits. For example, for a memory architecture having 8-bitwords, a BIST data value DM of (00) represents the 8-bit word value of(00000000), a BIST data value DM of (01) represents the 8-bit word valueof (01010101), a BIST data value DM of (10) represents the 8-bit wordvalue of (10101010), and a BIST data value DM of (11) represents the8-bit word value of (11111111), where the right-most bit is theleast-significant bit (LSB) in the word (i.e., even bit 0) and theleft-most bit is the most-significant bit (MSB) (i.e., odd bit N-1). Theexpansion of the two-bit BIST data values DM to the N-bit data values DRis implemented within input data mux block 116. Alternativeimplementations of BIST testing do not necessarily need to beconstrained in this two-bit manner. In general, other constraints may beapplied or even no constraints.

Similarly, bit-write enable mux block 118 receives (i) user bit-writeenable signals BW(PW-1:)[N-1:0] and (ii) BIST bit-write enable signalsBWM(PW-1:)[ 1:0] and presents bit-write enable signals BWR(PW-1:)[N-1:0]to the circuitry of FIG. 1A. Here, the two-bit BIST bit-write enablesignals BWM indicate that, for BIST testing, all of the even bits areenable/disabled together, and all of the odd bits are enabled/disabledtogether.

Write address mux block 120 receives (i) user write address dataAW(PW-1:0)[M-1:0] and (ii) BIST write address data AWM(PW-1:0)[M-1:0]and presents write address data AWR(PW-1:0)[M-1:0] to write addressbuffers 104 of FIG. 1A.

Read address mux block 122 receives (i) user read address dataAR(PR-1:0)[M-1:0] and (ii) BIST read address data ARM(PR-1:0)[M-1:0] andpresents read address data ARR(PR-1:0)[M-1:0] to read address buffers112 of FIG. 1A.

Write clock mux block 124 receives (i) user write clock signalsCKW[PW-1:0] and (ii) BIST write clock signal BCK and presents writeclock signals CKWR[PW-1:0] to the circuitry of FIG. 1A. The expansion ofthe single BIST write clock signal BCK to the PW write clock signalsCKWR is implemented within write clock mux block 124.

Write chip select mux block 126 receives (i) user write chip selectsignals CSW[PW-1:0] and (ii) BIST chip select signals CSWM[PW-1:0] andpresents write chip select signals CSWR[PW-1:0] to the circuitry of FIG.1A.

Read clock mux block 128 receives (i) user read clock signalsCKR[PR-1:0] and (ii) BIST clock signal BCK and presents read clocksignals CKRR[PR-1:0] to read address buffers 112 of FIG. 1A. Theexpansion of the single BIST clock signal BCK to the PR read clocksignals CKRR is implemented within read clock mux block 128.

FIG. 1C shows the circuitry used to process the output data QR read frommemory block 102, e.g., during BIST testing. As mentioned previously,architecture 100 supports memory blocks having up to four read ports.This limitation is dictated by the circuitry of FIG. 1C. In particular,BIST output data mux block 130 has four inputs 0, 1, 2, and 3, where muxblock input 0 receives output data QR(0)[N-1:0] from read port 0, muxblock input 1 receives output data QR(1)[N-1:0] from read port 1, muxblock input 2 receives output data QR(2)[N-1:0] from read port 2, andmux block input 3 receives output data QR(3)[N-1:0] from read port 3. Asindicated in FIG. 1C by the adjacent label “xN” , BIST output data muxblock 130 may be implemented, for example, using N one-bit 4:1 muxes orone N-bit 4:1 mux (although other implementations are also possible).

BIST output data mux block 130 is controlled by a control signalgenerated by mux decoder 132 based on two one-bit control signals (RMX0and RMX1) received from BIST controller 144 of FIG. 1D. When MRX0=0 andRMX1=0, mux decoder 132 instructs BIST output data mux block 130 toselect and present output data QR(0)[N-1:0] at its output. Similarly,when MRX0=1 and RMX1=0, mux decoder 132 instructs BIST output data muxblock 130 to select output data QR(1)[N-1:0]. When MRX0=0 and RMX1=1,mux decoder 132 instructs BIST output data mux block 130 to selectoutput data QR(2)[N-1:0]. Lastly, when MRX0=1 and RMX1=1, mux decoder132 instructs BIST output data mux block 130 to select output dataQR(3)[N-1:0].

In alternative embodiments, a memory architecture analogous toarchitecture 100 could be implemented with (1) a BIST data mux havingone or more additional inputs and (2) a decoder designed to receive oneor more additional one-bit control signals. In that case, the memoryarchitecture could support memory blocks having more than four readports.

The output from BIST output data mux block 130 is applied to the datainput port D of register (e.g., flip-flop) block 134. Here, too, thelabel “xN” indicates that register block 134 may be implemented, forexample, using N one-bit registers or one N-bit register (although otherimplementations are also possible). Similarly, the data input port D ofregister block 140 receives two one-bit expected data values ED0 and ED1from BIST controller 144 of FIG. 1D, where ED0 identifies the expectedvalue of the even bits in the output data QR read from memory block 102,and ED1 identifies the expected value of the odd bits. Here, the label“x2” indicates that register block 140 may be implemented using twoone-bit registers or one two-bit register.

The data output ports Q of register blocks 134 and 140 are connected toprovide inputs to comparator 142. Comparator 142 (i) compares the N bitsof output data from register block 134 to an N-bit expected data valuegenerated by expanding the two bits of expected data from register block140 and (ii) generates a one-bit match flag MF. The expansion of the twobits of expected data to N-bit expected data values is performed withincomparator 142. Match flag MF is 1, when each bit in the N-bit outputdata word is identical to the corresponding bit in the N-bit expecteddata word. Match flag MF is 0, when at least one bit in the N-bit outputdata word is different from the corresponding bit in the N-bit expecteddata word.

Register blocks 134 and 140 propagate data from their data input ports Dto their data output ports Q based on the rising edges (or,alternatively, the falling edges) in signals received at their clockinput ports CLK from OR block 138. OR block 138 applies a logical “OR”operation to its two inputs: (1) BIST clock signal BCK and (2) aninverted version of BIST interface enable signal BIST from inverterblock 136. When BIST testing is disabled, BIST is 0, and the output ofOR block 138 is fixed at 1 (i.e., independent of BCK). In that case,data is not propagated through register blocks 134 and 140, because theconstant signals applied to their clock input ports CLK will not haveany rising edges. When BIST testing is enabled, BIST is 1, and theoutput of OR block 138 is dictated by BCK. In that case, data willpropagate through register blocks 134 and 140 at every rising edge inBIST clock signal BCK.

During BIST testing, during successive cycles of BIST clock BCK, wordsof output data (identified by the corresponding BIST read address valueARM) are sequentially read from memory block 102 via different outputports, with a different output port being read during each differentclock cycle. These PR output data words QR are applied to thecorresponding input ports of BIST output data mux block 130. Forexample, if there are four read ports, then it takes four clock cyclesto update all of the data applied to BIST output data mux block 130.Note that, if the number of read ports PR in memory block 102 is lessthan four, then one or more of the higher numbered ports of BIST outputdata mux block 130 will not be utilized. BIST controller 144 updates thevalues of RMX0 and RMX1 at each clock cycle to sequentially select eachof the different output data words QR applied to BIST output data muxblock 130 so that each different output data word QR can be compared incomparator 142 to the expected data word generated based on ED0 and ED1.

Note that, when memory block 102 has only one read port, architecture100 could be implemented without BIST output data mux block 130 and muxdecoder 132, where the output data QR from that single read port isapplied directly to data input D of register block 134. Alternatively,architecture 100 could be implemented with mux block 130 and mux decoder132, where mux decoder 132 always selects the same input (e.g., input 0)of mux block 130 to which the single read port is connected.

As described above, comparator 142 performs a word-based comparisonbetween the output data and the expected data. Such a word-basedcomparison is acceptable for many types of BIST testing (e.g., whereBIST testing simply identifies whether the memory has any faults at allor is working perfectly). Where BIST testing needs to identify faults ata sub-word level, BIST testing can be designed to take advantage of thearchitecture's bit-write enable functionality to identify the locationof faults at a sub-word level.

As shown in FIG. 1D, in addition to (1) providing particular inputs toother circuitry within architecture 100 (as described previously) and(2) receiving the match flag MF from comparator 142, BIST controller 144also (i) receives control signals BIST and BFC from circuitry externalto architecture 100 and (ii) provides output signals BC and BF to thatexternal circuitry. The control signal BIST is the same BIST enablesignal described previously, and the BIST flag BF is the same as thematch flag MF generated by comparator 142. BIST controller 144 generatesthe BIST complete signal BC to indicate whether the current phase ofBIST testing is ongoing (e.g., logical 1) or completed (e.g., logical0).

The BIST function control signal BFC is used to control the duration ofBIST retention testing. BIST retention testing typically has two phases:one phase for storing high signals (e.g., corresponding to logical 1s)and one phase for storing low signals (e.g., corresponding to logical0s). When BFC is a logical 1, BIST controller 144 is able to initiate aphase of BIST retention testing. BFC goes from a logical 1 to a logical0 to inform the BIST controller that the current phase of BIST retentiontesting is complete and to instruct the BIST controller to output theBIST flag BF to indicate the results of that testing.

All of the circuitry shown in FIG. 1 may be implemented in hardware on asingle integrated circuit. Alternatively, one or more of the elements(e.g., BIST controller 144) could be implemented in software and/oroff-chip.

Generalized BIST Algorithm

Memory architecture 100 of FIG. 1 can be used to implement a variety ofdifferent BIST algorithms. For example, BIST testing for memoryarchitecture 100 might be designed to verify the proper operation of (a)each cell of memory block 102, (b) each write port address decoder inblock 106, (c) each read port address decoder in block 114, (d) thebit-write enabling function in write buffers 110 for each write port,and (e) comparator 142.

FIG. 3 shows a flow diagram of an exemplary BIST algorithm for memoryarchitecture 100 of FIG. 1. The exemplary BIST algorithm of FIG. 3 hasthree phases: Phase 302 in which the memory cells and the read portdecoders are tested, Phase 304 in which the write port decoders aretested, and Phase 306 in which bit-write enabling and the comparator aretested. Although not shown in FIG. 3, BIST testing could also includeother phases, such as retention (hold-time) testing.

Table II in FIG. 4A presents code for one possible implementation of aBIST algorithm for the memory cell and read port decoder testing ofPhase 302 of FIG. 3. In this particular code notation, forimplementations that use certain types of address generators, such asthose associated with binary counters, the symbol “z,1 ” indicates thatprocessing proceeds incrementally from row 0 to row W-1 in memory block102, while the symbol ”z,2 ” indicates that the processing proceedsdecrementally from row W-1 to row 0. For other types of addressgenerators, such as those associated with gray codes or linear feed-backshift registers (LFSRs), the sequences of addresses might not increment(or decrement) linearly. As such, in general, the symbol “

” represents a particular sequence of addresses associated with thecorresponding address generator, while the symbol “z,2 ” represents thecorresponding reverse sequence of addresses.

The symbol “W_(j) ^(kl)” corresponds to the writing of a specified bitpattern kl via write port j into the current word of memory block 102.Similarly, the symbol “W_(i, . . . , j) ^(kl)” corresponds to thesequential writing of bit pattern kl via write ports i through j intothe current word of memory block 102.

Analogously, the symbol “R_(j) ^(kl)” corresponds to (i) the reading ofthe data stored at the current word of memory block 102 via read port jand (ii) the comparison (by comparator 142) of that data to thespecified bit pattern kl to determine whether the stored data matchesthat bit pattern. Similarly, the symbol “R_(i, . . . ,j) ^(kl)”corresponds to (i) the sequential reading of the data stored at thecurrent word of memory block 102 via read ports i through j and (ii) thecomparison (by comparator 142) of that data to the specified bit patternkl to determine whether the stored data matches that bit pattern.

The symbol “W_(j) ^(kl||BD)” corresponds to the writing of a specifiedbit pattern kl via write port j into the current word of memory block102 during a bit-disturbing (BD) operation. One type of bit-disturbingoperation is to write data into one row, while reading data from another(e.g., adjacent) row. If a cell in the row being written to is notoperating properly, then this simultaneous read/write operation canresult in erroneous data being stored in that cell.

During Step 1 of Table II, at each row, starting from row 0 andincrementing to row W-1, bit pattern 10 is written into memory block 102via write port 0, where bit pattern 10=( . . . 101010). At the end ofStep 1, bit pattern 10 is stored in each row of memory block 102.

During Step 2 of Table II, at each row, starting from row 0 andincrementing to row W-1, (i) data is read from the current word via readport 0 and compared to bit pattern 10, (ii) bit pattern 01 is thenwritten into the current word via write port 0, where bit pattern 01=( .. . 010101), (iii) data is then read from the current word via read port0 and compared to bit pattern 01, (iv) data is then read from thecurrent word via read port 1 and compared to bit pattern 01, (v) data isthen read from the current word via read port 2 and compared to bitpattern 01, and lastly (vi) data is read from the current word via readport 3 and compared to bit pattern 01. At the end of Step 2, bit pattern01 is stored in each row of memory block 102.

During Step 3 of Table II, at each row, starting from row W-1 anddecrementing to row 0, (i) data is read from the current word via readport 0 and compared to bit pattern 01, (ii) bit pattern 10 is thenwritten into the current word via write port 0 during a BD operation,(iii) data is then read from the current word via read port 0 andcompared to bit pattern 10, and lastly (iv) bit pattern 01 is writteninto the current word via write port 0. At the end of Step 3, bitpattern 01 is stored in each row of memory block 102.

During Step 4 of Table II, at each row, starting from row W-1 anddecrementing to row 0, (i) data is read from the current word via readport 0 and compared to bit pattern 01, (ii) bit pattern 10 is thenwritten into the current word via write port 0, (iii) data is then readfrom the current word via read port 0 and compared to bit pattern 10,(iv) data is then read from the current word via read port 1 andcompared to bit pattern 10, (v) data is then read from the current wordvia read port 2 and compared to bit pattern 10, and lastly (vi) data isread from the current word via read port 3 and compared to bit pattern10. At the end of Step 2, bit pattern 10 is stored in each row of memoryblock 102.

During Step 5 of Table II, at each row, starting from row 0 andincrementing to row W-1, (i) data is read from the current word via readport 0 and compared to bit pattern 10, (ii) bit pattern 01 is thenwritten into the current word via write port 0 during a BD operation,(iii) data is then read from the current word via read port 0 andcompared to bit pattern 01, and lastly (iv) bit pattern 10 is writteninto the current word via write port 0. At the end of Step 3, bitpattern 10 is stored in each row of memory block 102.

During Step 6 of Table II, at each row, starting from row 0 andincrementing to row W-1, data is read from the current word via readport 0 and compared to bit pattern 10.

By the end of Phase 302 of Table II, the operations of each memory celland each read port decoder will have been tested, during both normal andBD operations, using both bit patterns 10 and 01. In addition, theoperations of the decoder for write port 0 will also have been tested.

Table III in FIG. 4B presents code for one possible implementation of aBIST algorithm for the write port decoder testing of Phase 304 of FIG.3. Steps 1 and 2 of Table III are implemented sequentially as a loop foreach write port. That is, Step 1 is implemented for write port 1, thenStep 2 is implemented for write port 1, then Step 1 is implemented forwrite port 2, then Step 2 is implemented for write port 2, then Step 1is implemented for write port 3, and lastly Step 2 is implemented forwrite port 3.

More particularly, for the first pass through the loop, using write port1, during Step 1 of Table III, at each row, starting from row 0 andincrementing to row W-1, (i) data is read from the current word via readport 0 and compared to bit pattern 10, and (ii) bit pattern 01 is thenwritten into memory block 102. At the end of Step 1, bit pattern 01 isstored in each row of memory block 102. During Step 2 of Table III,still using write port 1, at each row, starting from row W-1 anddecrementing to row 0, (i) data is read from the current word via readport 0 and compared to bit pattern 01, and (ii) bit pattern 10 is thenwritten into memory block 102. At the end of Step 2, bit pattern 10 isstored in each row of memory block 102.

The loop of Steps 1 and 2 of Table III is then repeated using write port2, and then repeated again using read port 3. By the end of Phase 304 ofTable III, the operations of each write port decoder will have beentested.

Table IV in FIG. 4C presents code for one possible implementation of aBIST algorithm for the bit-write enabling and comparator testing ofPhase 306 of FIG. 3. As with the steps of Table III, Steps 1-8 of TableIV are implemented sequentially as a loop for each write port. That is,Steps 1-8 are implemented sequentially for write port 0, then Steps 1-8are implemented sequentially for write port 1, then Steps 1-8 areimplemented sequentially for write port 2, and lastly Steps 1-8 areimplemented sequentially for write port 3. Note that the steps of TableIV are implemented for only a single row of memory block 102 (e.g., row0).

More particularly, for the first pass through the loop, using write port0, during Step 1 of Table IV, bit pattern 01 is written into row 0 ofmemory block 102 with bit-write enable signal BW=( . . . 0101),indicating that only the even bits are write-enabled. At the end ofphase 304 of Table III, bit pattern 10 was stored in row 0 of memoryblock 102. As such, at the end of Step 1 of Table IV, row 0 contains bitpattern 11=( . . . 1111).

During Step 2 of Table IV, data is read from row 0 and compared to bitpattern 11.

During Step 3 of Table IV, bit pattern 01 is written into row 0 will allbits enabled.

During Step 4 of Table IV, data is read from row 0 and compared to bitpattern 10. In this case, comparator 142 should indicate that there isno match between the read data (i.e., bit pattern 01) and the “expected”data (bit pattern 10).

During Step 5 of Table IV, bit pattern 10 is written into row 0 withbit-write enable signal BW=( . . . 1010), indicating that only the oddbits are write-enabled. At the end of Step 4 of Table IV, bit pattern 01was stored in row 0. As such, at the end of Step 5 of Table IV, row 0contains bit pattern 11=( . . . 1111).

During Step 6 of Table IV, data is read from row 0 and compared to bitpattern 11.

During Step 7 of Table IV, bit pattern 10 is written into row 0 will allbits enabled.

During Step 8 of Table IV, data is read from row 0 and compared to bitpattern 01. As in Step 4, in Step 8, comparator 142 should indicate thatthere is no match between the read data (i.e., bit pattern 10) and the“expected” data (i.e., bit pattern 01). The loop of Steps 1-8 of TableIV is then repeated using write port 1, then repeated again using writeport 2, and lastly repeated again using read port 3. By the end of Phase306 of Table IV, the operations of (i) bit-write enabling for each writeport and (2) the comparator will have been tested.

The steps shown in Tables II-IV for Phases 302-306 of FIG. 3,respectively, correspond to a memory block having four write ports andfour read ports. If a particular memory block has different numbers ofwrite and/or read ports, then the algorithm of Tables II-IV should beappropriately modified. For example, if a particular memory block hasonly two write ports, then the subscripts of Steps 1-2 of Table III andSteps 1, 3, 5, and 7 of Table IV should be modified to drop referencesto write ports 2 and 3. Similarly, if a particular memory block has onlythree read ports, then the subscripts of Steps 2 and 4 of Table IIshould be modified to drop references to read port 3. By the same token,if a particular memory block has more than four write ports and/or morethan four read ports, then the corresponding steps should be modified toadd references to those additional ports. Note that, as mentionedearlier, the hardware of FIG. 1 would also need to be modified toaccommodate more than four read ports.

Automatic Design of BIST Hardware

The generic natures of both the architecture of FIG. 1 and the algorithmof Tables II-IV enable the hardware design of a particular computermemory system to be generated using an automated (e.g.,computer-implemented), off-line design tool. FIG. 5 shows the flowdiagram for such a design tool.

At step 502 of FIG. 5, the parameters that identify the configurationcharacteristics of a particular computer memory system are specified.These include the number of write ports (PW), the number of read ports(PR), the number of words (W), and the number of bits per word (N) inthe memory block.

At step 504, the design tool compiles the generic BIST algorithm ofTables II-IV based on the specified memory configuration characteristicsto generate the hardware design for that particular memory system.Although not necessarily required, in a preferred implementation, theFSM for BIST controller 144 of FIG. 1D is based on a generic FSM designthat applies to all supported hardware designs. This generic FSM usescounters to identify the currently selected read and write ports, wherethe FSM appropriately increments (i) the read-port counter from 1 to thespecified value of the parameter PR and (ii) the write-port counter from1 to the specified value of the parameter PW to control the BISToperations of the particular memory system.

The compilation performed by the design tool preferably takes intoaccount the specified memory configuration characteristics to generatean efficient hardware design that has little if any excess hardware.Note that, in possible implementations of the design tool, when thememory block has only one read port, mux block 130 and mux decoder 132might be included in hardware design even though, technically, they arenot needed. In other implementations of the design tool, mux block 130and mux decoder 132 might be excluded from the hardware design when thememory block has only one read port.

Depending on the particular implementation, additional constraints maybe applied. For example, the range of possible memory configurationssupported by the design tool could be limited to those having no morethan a specified total number of ports (e.g., five). Such a constraintis indicated in the last three rows of Table I in FIG. 2, where thenumber of write ports (PW) can be anywhere from one to four, the numberof read ports (PR) can be anywhere from one to four, and the totalnumber of ports (PW+PR) can be anywhere from two to five. Note that thisparticular constraint assumes that each port is either a write-only portor a read-only port.

Although BIST testing has been described in the context of thearchitecture of FIG. 1 and the algorithm of FIGS. 3 and 4, it should beunderstood (1) that the architecture of FIG. 1 can support differentBIST algorithms and (2) that the algorithm of FIGS. 3 and 4 can beimplemented using different BIST hardware designs. For example, thealgorithm of FIGS. 3 and 4 can be implemented using a BIST hardwaredesign that has a different comparator for each different read port (asopposed to the single, multiplexed comparator of FIG. 1C).

The present invention may be implemented as circuit-based processes,including possible implementation as a single integrated circuit (suchas an ASIC or an FPGA), a multi-chip module, a single card, or amulti-card circuit pack. As would be apparent to one skilled in the art,various functions of circuit elements may also be implemented asprocessing steps in a software program. Such software may be employedin, for example, a digital signal processor, micro-controller, orgeneral-purpose computer.

The present invention can be embodied in the form of methods andapparatuses for practicing those methods. The present invention can alsobe embodied in the form of program code embodied in tangible media, suchas floppy diskettes, CD-ROMs, hard drives, or any other machine-readablestorage medium, wherein, when the program code is loaded into andexecuted by a machine, such as a computer, the machine becomes anapparatus for practicing the invention. The present invention can alsobe embodied in the form of program code, for example, whether stored ina storage medium, loaded into and/or executed by a machine, ortransmitted over some transmission medium or carrier, such as overelectrical wiring or cabling, through fiber optics, or viaelectromagnetic radiation, wherein, when the program code is loaded intoand executed by a machine, such as a computer, the machine becomes anapparatus for practicing the invention. When implemented on ageneral-purpose processor, the program code segments combine with theprocessor to provide a unique device that operates analogously tospecific logic circuits.

It will be further understood that various changes in the details,materials, and arrangements of the parts which have been described andillustrated in order to explain the nature of this invention may be madeby those skilled in the art without departing from the scope of theinvention as expressed in the following claims.

Although the steps in the following method claims, if any, are recitedin a particular sequence with corresponding labeling, unless the claimrecitations otherwise imply a particular sequence for implementing someor all of those steps, those steps are not necessarily intended to belimited to being implemented in that particular sequence.

1. BIST circuitry for testing a memory having multiple read ports, theBIST circuitry comprising: a multiplexer block adapted to receive datafrom each of the multiple read ports and output selected data from oneof the multiple read ports; and a comparator adapted to compare theselected data from the multiplexer block with expected data to determinewhether the selected data matches the expected data.
 2. The invention ofclaim 1, further comprising a controller adapted to generate and updatea mux select signal to cause the multiplexer block to sequentiallyselect data from different ones of the multiple read ports.
 3. Theinvention of claim 2, wherein: the mux select signal comprises multiplebits; and further comprising a mux decoder adapted to convert themulti-bit mux select signal for use in controlling the multiplexerblock.
 4. The invention of the claim 1, wherein the BIST circuitry hasonly one comparator.
 5. The invention of claim 1, wherein the BISTcircuitry is adapted to test different types of memory having differentnumbers of read ports by appropriately controlling the selection of databy the multiplexer block.
 6. A method for designing BIST circuitry fortesting a memory having one or more write ports and one or more readports, the method comprising: assigning one or more values for one ormore memory configuration parameters for the memory; and compiling ageneric BIST algorithm based on the one or more memory configurationparameters to generate a design for the BIST circuitry.
 7. The inventionof claim 6, wherein the compiling is implemented using acomputer-implemented design tool.
 8. The invention of claim 6, whereinthe one or more memory configuration parameters comprise a number ofwrite ports for the memory and a number of read ports for the memory. 9.The invention of claim 8, wherein the total number of write and readports is limited to a specified value.
 10. The invention of claim 8,wherein the one or more memory configuration parameters furthercomprises a number of bits per memory entry and a number of entries inthe memory.
 11. The invention of claim 6, wherein the generic BISTalgorithm is adapted to be compiled based on different sets of thememory configuration parameter values to generate different BISTcircuitry designs corresponding to different memory configurations. 12.The invention of claim 11, wherein: the one or more memory configurationparameters comprise a number of write ports for the memory and a numberof read ports for the memory; and the total number of write and readports is limited to a specified value.
 13. The invention of claim 6,wherein the generic BIST algorithm is adapted to test memory cells inthe memory, one or more read port decoders for the memory, and one ormore write port decoders for the memory.
 14. The invention of claim 13,wherein the generic BIST algorithm is further adapted to test bit-writeenabling for the memory and a comparator of the BIST circuitry.
 15. Theinvention of claim 14, the generic BIST algorithm comprises: a firsttest phase adapted to test the memory cells and the one or more readport decoders; a second test phase adapted to test the one or more writeport decoders; and a third test phase adapted to test the bit-writeenabling and the comparator.
 16. The invention of claim 13, wherein: thememory has two or more write ports and two or more write port decoders;and testing for the write port decoders involves cycling through thedifferent write port decoders.
 17. The invention of claim 13, wherein:the memory has two or more read ports and two or more read portdecoders; and testing for the read port decoders involves cyclingthrough the different read port decoders.
 18. The invention of claim 6,wherein: the memory has multiple read ports; and the design for the BISTcircuitry comprises: a multiplexer block adapted to receive data fromeach of the multiple read ports and output selected data from one of themultiple read ports; and a comparator adapted to compare the selecteddata from the multiplexer block with expected data to determine whetherthe selected data matches the expected data.
 19. The invention of claim18, wherein the design further comprises a controller adapted togenerate and update a mux select signal to cause the multiplexer blockto sequentially select data from different ones of the multiple readports.
 20. A computer-implemented design tool for designing BISTcircuitry for testing a memory having one or more write ports and one ormore read ports, the design tool comprising: means for assigning one ormore values for one or more memory configuration parameters for thememory; and means for compiling a generic BIST algorithm based on theone or more memory configuration parameters to generate a design for theBIST circuitry.